<template>
	<uni-popup ref="zmesageDetial_pop">
		<view class="zmesageDetial4s">
			<view class="title">
				详情
			</view>
			<view class="black_1">
				<scroll-view scroll-y="true" @scrolltolower="scroll" class="buyChicken_block_centent">
					<view class="item">
						<u-parse :content="item.content"></u-parse>
					</view>
				</scroll-view>
				<view class="black_2">
					<uni-dateformat :date="item.createtime*1000" format="yyyy-MM-dd">
					</uni-dateformat>
				</view>
			</view>

		</view>
		<view style="height: 20px;"></view>
		<view class="bottom">
			<image class="close" @click="close" src="/static/my/close2.png"></image>
		</view>
	</uni-popup>
</template>

<script>
	export default {

		name: "zmesageDetial",
		data() {
			return {
				current: 0,
				message: ' ',
				item: {
					"id": 5,
					"type": "inner_msg",
					"title": "",
					"content": "",
					"weigh": 0,
					"createtime": 1690513813,
					"is_read": false
				}
			};
		},
		methods: {
			open(data) {
				var that =this
				this.item = data
				console.log(this.item)
				this.api.http.requests('sitemsg/setRead', {id :this.item.id}, res => {
					uni.$emit('messageSuccsse',{type:1,msg:res.msg})
				}, "POST")
				this.$refs.zmesageDetial_pop.open()
			},
			close() {
				this.$refs.zmesageDetial_pop.close()
			},
			select(index) {
				this.current = index
			},
			toPay() {
				this.$refs.pay.open()
			},
			scroll() {

			},
		}
	}
</script>

<style scoped lang="less">
	.zmesageDetial4s {
		background: linear-gradient(295deg, #D2823A 0%, #EF9164 100%);
		border-radius: 10px;
		padding: 2px;

		.title {
			text-align: center;
			font-size: 49rpx;
			font-weight: 800;
			color: #FFFFFF;
			padding: 5px;
		}

		.black_1 {

			background-color: #FBF8E7;
			border-radius: 10px;
			// margin: 2px;

			.buyChicken_block_centent {
				height: 300px;
				width: 600rpx;
			}

			.item {
				padding: 10px;
			}

			.black_2 {
				text-align: center;
				margin: auto;
				padding: 10px;
				font-size: 25rpx;
				font-weight: 400;
				color: #666666;
			}
		}

	}

	.bottom {
		text-align: center;
	}

	.close {
		text-align: center;
		margin: auto;
		width: 30px;
		height: 30px;
	}
</style>